package track_code

class AdminService {

    /**
     * 注册用户
     * @param user
     * @return
     */

    def registerUser(TrackUser user) {
        user.password = PasswordUtil.md5Encode(user.password);
        if (user.save([flush: true])) {
            return true;
        }
        throw new RuntimeException("注册用户失败");
    }
}
